#define _CRT_SECURE_NO_WARNINGS
#include"sort.h"


void PrintArray(int* a, int n);

void Bubble_test(int*a,int n) {
	BubbleSort(a, n);
	PrintArray(a, n);
}

void Insert_test(int* a, int n) {
	InsertSort(a, n);
	PrintArray(a, n);
}

void Shell_test(int* a, int n) {
	ShellSort(a, n);
	PrintArray(a, n);
}

void Select_test(int* a, int n) {
	SelectSort(a, n);
	PrintArray(a, n);
}

void Quick_test(int* a, int n) {
	//QuickSort1(a, 0, n - 1);
	//QuickSort3(a, 0, n - 1);
	QuickSortNonR(a, 0, n - 1);
	PrintArray(a, n);
}

void Merge_test(int* a, int n) {
	MergeSortNonR(a, n);
	PrintArray(a, n);

}
int main() {
	int a[] = { 10,8,2,1,4,6,5,3,9,7,0 };
	//int a[] = { 2,3,4,5,6,7,8,9,10,11 };
	int n = sizeof(a) / sizeof(a[0]);
	//Bubble_test(a,n);
	//Merge_test(a, n);
	CountSort(a, sizeof(a) / sizeof(a[0]));
	return 0;
}




void PrintArray(int* a, int n) {
	for (int i = 0; i < n; i++) {
		printf("%d ", a[i]);
	}
	printf("\n");
}